package com.service.impl;

import com.bean.User;
import com.dao.UserDao;
import com.mapper.UserMapper;
import com.service.UserService;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.Map;

@Repository
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public User login(String userPhone, String userPassword) {
        Map<String,String> map=new HashMap<String,String>();
        map.put("userPhone",userPhone);
        map.put("userPassword",userPassword);
        User user=userDao.login(map);
        return user;
    }
}
